<?php

namespace app\admin\controller;

use think\Controller;
use think\Request;
use app\admin\model\System as SystemModel;

class System extends Controller
{
    public function index(Request $request)
    {
        $system = SystemModel::get(1);

        if(request()->isPost())
        {
            $system->reg_on = $request->param('reg_on');
            $system->save();
//            $this->success('设置成功');

        }
        $this->assign('system',$system);
        return $this->fetch();
    }
}
